import React from 'react'
import { Link, NavLink } from 'react-router-dom'
import './index.less'
export default function Common({ children, history }) {
  return (
    <div>
      <h1>Header</h1>
      <NavLink activeClassName="actived" to="/index/home">Home </NavLink >
      <NavLink activeClassName="actived" to="/index/about">About </NavLink >
      <button onClick={() => history.push('/index')}>回到index</button>
      <div style={{ background: '#ccc', width: '200px', height: '200px' }}>
        {children}
      </div>
      <h1>Footer</h1>
    </div>
  )
}
